use strict;
use warnings;
use lib "blog\\SOAP-Lite-0.710.08\\lib"; 
use lib "blog";
use WordPress;
use Encode;


my $wp = WordPress->new(
    'http://dhgx.yo2.cn/xmlrpc.php',
    'herberthb@qq.com',
    '789456'
);

if(! open NEWS,"<new.html"){
	die "openfaile($!)";
}
while(<NEWS>){
	chomp;
	my $title = $_;
	my $content = <NEWS>;
	print $title;
	my $r = $wp->post($title,$content,["update"]);
	print " \n$r";
}

